<?php
require_once('start_session.php');
include_once('db.php');

if(!isset($_SESSION['id'])){
	die("Not logged in");
}

$id = $_POST["image_id"];

$dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME) or die("DB Error");

$query =	"DELETE
			FROM image 
			WHERE $id = id";
				
mysqli_query($dbc, $query);


echo "The image with id $id is removed";


?>